package ao.util.time;

import ao.util.math.rand.Rand;

/**
 * User: aostrovsky
 * Date: 9-Jun-2009
 * Time: 2:52:16 PM
 */
public class Sched
{
    //--------------------------------------------------------------------
    private Sched() {}


    //--------------------------------------------------------------------
    public static void sleep(long millis)
    {
        try {
            Thread.sleep(millis);
        } catch (InterruptedException ignored) {}
    }


    //--------------------------------------------------------------------
    public static void sleepUpto(long millis)
    {
        sleep( (long) Rand.nextDouble(millis) );
    }
}
